home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
dskut
/
disktime.zip
/
SECNDS.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-11-01
|
714b
|
31 lines
Function Secnds:Real;
{
This function returns the seconds past midnight as Real number
Input None
Output Secnds Seconds past midnight as a Real number
Strategy (1) Call DOS to get the time
(2) Convert to floating point seconds past midnight
}
Type
Result=Record
Ax,Bx,Cx,Dx,Bp,Si,Di,Ds,Es,Flags:Integer;
End;
Var
Sys:Result;
Begin
SYS.AX:=$2C00 { AH is get time };
Intr($21,Sys);
If Odd(Sys.Flags) then
Begin
Writeln('Error getting the time');
Halt;
End;
Secnds:=Lo(SYS.DX)/100.+Hi(SYS.DX)+60.*(Lo(SYS.CX)+60.*Hi(SYS.CX));
End;